home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / segue.exe / NSPLTMO.PRG < prev    next >
Text File  |  1991-10-29  |  1KB  |  45 lines

  1. *.............................................................................
  2. *
  3. *   Program Name: NSPLTMO.PRG       Copyright: HRF Associates, Inc.
  4. *   Date Created: 10/29/11           Language: Clipper
  5. *   Time Created: 01:12:13             Author: Bob Fogle
  6. *
  7. *.............................................................................
  8. * Supplemental SEGUE function for setting spooler timeout value in seconds.
  9. * Functionally equivilent to N_SPLTMO function in NETLIB library.
  10. *
  11. FUNCTION NSPLTMO_
  12. * Purpose: To set spooler timeout value in seconds.
  13. * Usage     : NSPLTMO_([<expN1>])
  14. *        :
  15. * Where  : <expN1> = Timout Value (seconds)
  16. *        :      0 = no timeout.
  17. *        :
  18. PARAMETERS tmout
  19. LOCAL mtmout
  20. PRIVATE rtn :=0
  21.  
  22. do while .t.
  23.   * Check to make sure passed variable types are correct.
  24.   if valtype(tmout)<>'N' .AND. tmout<>nil
  25.     rtn = -101
  26.     exit
  27.   endi
  28.  
  29.   * Set up defaults
  30.   mtmout =  if(valtype(tmout)=='N',tmout,0)
  31.  
  32.   * Get/Set spooler timeout
  33.   if pcount()=0                   // If no arguments, return current setting.
  34.     rtn = PRJBDFG(8)              // Get Default Print Job Flags (Flush Capture Timeout Count)
  35.   else
  36.     mtmout= 18 * mtmount    // adjust for seconds
  37.     rtn = PRJBDFS(,,,,,,,mtmout)  // Set Default Print Job Flags (Flush Capture Timeout Count)
  38.   endi
  39.   exit
  40. endd
  41. RETURN rtn
  42.  
  43.  
  44.  
  45.